﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Flighttracker
{
    public partial class pilootinzetten : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Piloot piloot = (Piloot)Flighttracker.Instance.ZoekObject(Request.QueryString["id"]);
            GridView1.DataSource = piloot.InzetList; ;
            GridView1.DataBind();
        }


        protected void GridView1_RowDataBound1(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ceedfc'");
                e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=''");
                e.Row.Attributes.Add("style", "cursor:pointer;");
                e.Row.Attributes.Add("onclick", "location='vluchten.aspx?id=" + e.Row.Cells[0].Text + "'");
            }
        }
    }
}